package top.kaoshanji.p2ch19a.support;

import java.util.concurrent.CountDownLatch;

/**
 * 运动员线程
 * author kaoshanji
 * ^_^
 * create time 2025/2/27 19:30
 */
public class Racer extends Thread {

    private CountDownLatch latch;

    public Racer(CountDownLatch latch) {
        this.latch = latch;
    }

    @Override
    public void run() {
        try {
            this.latch.await();
            System.out.println(getName() + " start run "+System.currentTimeMillis());
        } catch (InterruptedException e) {
            /// ///
        }

    }
}
